<style>
    .xxpayPopupDiv .layui-form-label {
        width:15% !important;
        margin-left:1%;
    }
    .xxpayPopupDiv .layui-input-inline {
        width: 33% !important;
        margin-top: 0px;
    }
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <form class="layui-form layui-form-pane">
            <div class="layui-tab layui-tab-brief">
                <div class="layui-tab-content">
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付宝账号</label>
                        <div class="layui-input-inline">
                            <input type="text" id="alipayLoginId" name="alipayLoginId" placeholder="输入支付宝账号（支付宝账号 / 手机号 / 邮箱）" autocomplete="off" class="layui-input">
                        </div>
                        <label class="layui-form-label">总收款限制(元)</label>
                        <div class="layui-input-inline">
                            <input type="tel" id="totalMoneyLimit" name="totalMoneyLimit" lay-verify="required" placeholder="输入总收款限制(元)" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="status" value="1" title="正常分账" checked="checked">
                            <input type="radio" name="status" value="0" title="暂停分账">
                            <input type="radio" name="status" value="2" title="金额限制分账" disabled="disabled">
                        </div>
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-inline">
                            <input type="text" id="remark" name="remark" lay-verify="remark" placeholder="输入备注" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block" style="padding-bottom: 20px;">
                        <button type="button" class="layui-hide xxpayYesBtn" lay-submit="" lay-filter="supplierAdd">保存</button>
                    </div>
                </div>

            </div>
        </form>
    </div>
</div>

<script>
    layui.use(['admin', 'form'],function(){
        var form = layui.form
        ,$ = layui.$
        ,admin = layui.admin
        ,element = layui.element
        ,layer = layui.layer ;

        element.render('breadcrumb', 'breadcrumb');

        form.on('submit(supplierAdd)', function(data) {
            if (!data.field.alipayLoginId){
                layer.msg("请填写支付宝账号！");
                return false;
            }
            //这里可以写ajax方法提交表单
            admin.req({
                type: "POST",
                url: layui.setter.baseUrl + '/alipayCashUser/add',
                data: data.field,
                success: function(res){
                    if(res.code == 0) {
                        layer.alert(res.msg, {title: "提示"}, function(index){
                        layer.closeAll(); //关闭所有弹层
                        layui.table.reload('tableReload'); //调用业务弹层外表格重新加载
                        });
                    }
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
        form.render();
    })
</script>